gusucode.com > 现代通信系统——使用MATLAB(+全部程序) > 现代通信系统——使用MATLAB(+全部程序)/现代通信系统——使用MATLAB(+全部程序)/Matlab 程序/Chapter10/programs/prgs/ooknrzmf.m

    function [ret,x0,str,ts,xts]=ooknrzmf(t,x,u,flag);
%OOKNRZMF	is the M-file description of the SIMULINK system named OOKNRZMF.
%	The block-diagram can be displayed by typing: OOKNRZMF.
%
%	SYS=OOKNRZMF(T,X,U,FLAG) returns depending on FLAG certain
%	system values given time point, T, current state vector, X,
%	and input vector, U.
%	FLAG is used to indicate the type of output to be returned in SYS.
%
%	Setting FLAG=1 causes OOKNRZMF to return state derivatives, FLAG=2
%	discrete states, FLAG=3 system outputs and FLAG=4 next sample
%	time. For more information and other options see SFUNC.
%
%	Calling OOKNRZMF with a FLAG of zero:
%	[SIZES]=OOKNRZMF([],[],[],0),  returns a vector, SIZES, which
%	contains the sizes of the state vector and other parameters.
%		SIZES(1) number of states
%		SIZES(2) number of discrete states
%		SIZES(3) number of outputs
%		SIZES(4) number of inputs
%		SIZES(5) number of roots (currently unsupported)
%		SIZES(6) direct feedthrough flag
%		SIZES(7) number of sample times
%
%	For the definition of other parameters in SIZES, see SFUNC.
%	See also, TRIM, LINMOD, LINSIM, EULER, RK23, RK45, ADAMS, GEAR.

% Note: This M-file is only used for saving graphical information;
%       after the model is loaded into memory an internal model
%       representation is used.

% the system will take on the name of this mfile:
sys = mfilename;
new_system(sys)
simver(1.3)
if (0 == (nargin + nargout))
     set_param(sys,'Location',[195,42,1260,320])
     open_system(sys)
end;
set_param(sys,'algorithm',     'RK-45')
set_param(sys,'Start time',    '0.0')
set_param(sys,'Stop time',     '999999')
set_param(sys,'Min step size', '0.000001')
set_param(sys,'Max step size', '0.01')
set_param(sys,'Relative error','1e-6')
set_param(sys,'Return vars',   '')

add_block('built-in/S-Function',[sys,'/',['Integrate and Dump',13,'']])
set_param([sys,'/',['Integrate and Dump',13,'']],...
		'function name','schdint',...
		'parameters','td, ts, limit',...
		'Mask Display','Scheduled\nreset-int',...
		'Mask Type','Scheduled reset integration')
set_param([sys,'/',['Integrate and Dump',13,'']],...
		'Mask Dialogue','Reset the state to be zero(s) at the\nscheduled reset sample point.|Scheduled reset time interval and offset (sec):|Computation sample time and offset (sec):|Modulo bound:')
set_param([sys,'/',['Integrate and Dump',13,'']],...
		'Mask Translate','td=@1;ts=@2;limit=@3;')
set_param([sys,'/',['Integrate and Dump',13,'']],...
		'Mask Help','This block resets the state(s) to be zero(s) at the reset time points. The reset interval can be a two-element vector with the second element as offset. The computation sample time must be smaller than the reset interval. The block resets the state value to be the remainder of the state divided by the modulo bound when the absolute value of the state is larger than the modulo bound.')
set_param([sys,'/',['Integrate and Dump',13,'']],...
		'Mask Entries','1\/.01\/999\/',...
		'position',[720,103,800,147])


%     Subsystem  'Quelle'.

new_system([sys,'/','Quelle'])
set_param([sys,'/','Quelle'],'Location',[355,528,737,675])


%     Subsystem  ['Quelle/Pulses deivide',13,'same sample time1'].

new_system([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']])
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],'Location',[55,192,283,286])

add_block('built-in/S-Function',[sys,'/',['Quelle/Pulses deivide',13,'same sample time1/S-function1']])
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1/S-function1']],...
		'function name','homopuls',...
		'parameters','samp_time, out_divid, offset',...
		'position',[40,31,105,59])

add_block('built-in/Outport',[sys,'/',['Quelle/Pulses deivide',13,'same sample time1/Outport']])
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1/Outport']],...
		'position',[160,35,180,55])
add_line([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],[110,45;155,45])
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Display','Vector\nPulse',...
		'Mask Type','Pulse generator')
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Dialogue','Vector pulses with sample rate of each pulse as Sample_time ./Divider. |Sample time (scalar, sec):|Divider (integer vector):|Offset (have same dimension as Divider:')
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Translate','samp_time=@1;out_divid=@2;offset=@3;')
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Help','This block generator a vector pulses. The output length is the same as the vector defined in "Divider". The ith element of the output has the sample time Sample_time/Divider(i). All elements in "Divider" must be integers.')
set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'Mask Entries','ts\/1\/off\/')


%     Finished composite block ['Quelle/Pulses deivide',13,'same sample time1'].

set_param([sys,'/',['Quelle/Pulses deivide',13,'same sample time1']],...
		'position',[50,56,110,94])

add_block('built-in/Outport',[sys,'/','Quelle/out_1'])
set_param([sys,'/','Quelle/out_1'],...
		'position',[295,65,315,85])

add_block('built-in/S-Function',[sys,'/','Quelle/Message source'])
set_param([sys,'/','Quelle/Message source'],...
		'BackGround',5,...
		'function name','trigwksp',...
		'parameters','var,thd,cyclFlag,ini',...
		'Mask Display','Triggered\nread',...
		'Mask Type','Read from workspace')
set_param([sys,'/','Quelle/Message source'],...
		'Mask Dialogue','The raising edge of input pulse trigger the block output the next row from the workspace variable.|Read the variable:|Threshold for the input pulse:|Cyclic read variable (1) or amend zeros (0).|Output before first trigger:')
set_param([sys,'/','Quelle/Message source'],...
		'Mask Translate','var=@1;thd=@2;cyclFlag=@3;ini=@4;',...
		'Mask Help','This block reads the data from a workspace variable. The output is refreshed at the raising edge of the input pulse.')
set_param([sys,'/','Quelle/Message source'],...
		'Mask Entries','var\/.1\/cyc\/ini\/',...
		'position',[180,53,255,97])
add_line([sys,'/','Quelle'],[260,75;290,75])
add_line([sys,'/','Quelle'],[115,75;175,75])
set_param([sys,'/','Quelle'],...
		'Mask Display','plot(0,0,100,100,x,y);Rd wksp',...
		'Mask Type','Read from workspace')
set_param([sys,'/','Quelle'],...
		'Mask Dialogue','Read from a workspace variable at\nsampling time point.|Variable (column_number=block_output_length):|Data output sample time (sec):|Repeat flag (1: repeat read, 0: output zeros after eof).|Initial output:')
set_param([sys,'/','Quelle'],...
		'Mask Translate','var=@1;td=@2;ts=td(1);if (length(td)>=2),off=td(2);else off=0;end;cyc=@3;ini=@4;[x,y]=srcsicon(7);')
set_param([sys,'/','Quelle'],...
		'Mask Help','This block reads from a workspace variable at a given sample time. The column number is the block output vector length. When the simulation reaches the end of the variable (eof), the block will cyclically output from the first row of the variable or output zeros based on the repeat flag entree.')
set_param([sys,'/','Quelle'],...
		'Mask Entries','randint(1000,1,2)\/1\/1\/1\/')


%     Finished composite block 'Quelle'.

set_param([sys,'/','Quelle'],...
		'position',[5,103,65,147])

add_block('built-in/Scope',[sys,'/','x_e(t)'])
set_param([sys,'/','x_e(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,727,1280,827])
open_system([sys,'/','x_e(t)'])
set_param([sys,'/','x_e(t)'],...
		'position',[670,175,700,205])

add_block('built-in/Scope',[sys,'/','Empfangssignal r(t)'])
set_param([sys,'/','Empfangssignal r(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,630,1280,730])
open_system([sys,'/','Empfangssignal r(t)'])
set_param([sys,'/','Empfangssignal r(t)'],...
		'position',[585,210,615,240])

add_block('built-in/Clock',[sys,'/','Clock'])
set_param([sys,'/','Clock'],...
		'position',[215,145,235,165])

add_block('built-in/Fcn',[sys,'/','Fcn1'])
set_param([sys,'/','Fcn1'],...
		'hide name',0,...
		'Expr','cos(4*pi*u)',...
		'position',[260,140,355,170])

add_block('built-in/Product',[sys,'/','Product'])
set_param([sys,'/','Product'],...
		'hide name',0,...
		'position',[395,118,425,142])


%     Subsystem  'Kanal'.

new_system([sys,'/','Kanal'])
set_param([sys,'/','Kanal'],'Location',[11,262,273,408])

add_block('built-in/Inport',[sys,'/','Kanal/in_1'])
set_param([sys,'/','Kanal/in_1'],...
		'position',[45,10,65,30])

add_block('built-in/Outport',[sys,'/','Kanal/out_1'])
set_param([sys,'/','Kanal/out_1'],...
		'position',[200,55,220,75])

add_block('built-in/Sum',[sys,'/','Kanal/Sum'])
set_param([sys,'/','Kanal/Sum'],...
		'position',[150,55,170,75])


%     Subsystem  ['Kanal/Gaussian noise',13,'generator'].

new_system([sys,'/',['Kanal/Gaussian noise',13,'generator']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],'Location',[22,119,370,243])

add_block('built-in/State-Space',[sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'A','[]',...
		'B','[]',...
		'C','[]',...
		'D','K',...
		'Mask Display','K',...
		'Mask Type','Matrix Gain',...
		'Mask Dialogue','Matrix Gain.|Gain matrix:')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'Mask Translate','K = @1;',...
		'Mask Help','Multiplies input vector by entered matrix to produce output vector (y=Au).',...
		'Mask Entries','d\/')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Matrix',13,'Gain']],...
		'position',[140,61,165,89])

add_block('built-in/White Noise',[sys,'/',['Kanal/Gaussian noise',13,'generator/Random',13,'Number']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Random',13,'Number']],...
		'Seed','s',...
		'position',[35,57,80,93])

add_block('built-in/Constant',[sys,'/',['Kanal/Gaussian noise',13,'generator/Constant']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Constant']],...
		'Value','m',...
		'position',[140,20,160,40])

add_block('built-in/Sum',[sys,'/',['Kanal/Gaussian noise',13,'generator/Sum']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/Sum']],...
		'position',[220,60,240,80])

add_block('built-in/Outport',[sys,'/',['Kanal/Gaussian noise',13,'generator/out_1']])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator/out_1']],...
		'position',[285,60,305,80])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[165,30;190,30;190,65;215,65])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[245,70;280,70])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[170,75;215,75])
add_line([sys,'/',['Kanal/Gaussian noise',13,'generator']],[85,75;135,75])
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Display','plot(0,0,100,100,x,y);Gaussian',...
		'Mask Type','Gaussian noise generator')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Dialogue','Generate Gaussian distributed noise with\ngiven mean and variance value.|Mean value:|Variance (vector or matrix):|Initial seed:')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Translate','m=@1;d=@2;s=@3;[m,d,s]=gwnoise(m,d,s);[x,y]=srcsicon(3);')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Help','When the mean value and seed are vectors, the output of this block is a vector. The length of the vector is the same as the length of the mean value vector or the length of the seed. When the variance entry is a vector, the variance is a diagonal matrix.')
set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'Mask Entries','m\/d\/s\/')


%     Finished composite block ['Kanal/Gaussian noise',13,'generator'].

set_param([sys,'/',['Kanal/Gaussian noise',13,'generator']],...
		'position',[25,48,105,92])
add_line([sys,'/','Kanal'],[175,65;195,65])
add_line([sys,'/','Kanal'],[70,20;115,20;115,60;145,60])
add_line([sys,'/','Kanal'],[110,70;145,70])
set_param([sys,'/','Kanal'],...
		'Mask Display','plot(0,0,100,100,x,y);AWGN',...
		'Mask Type','AWGN channel, fixed parameter')
set_param([sys,'/','Kanal'],...
		'Mask Dialogue','Additive white Gaussian noise channel\nwith fixed mean and variance.|Mean value:|Variance (std^2):|Initial Seed:',...
		'Mask Translate','m=@1;d=@2;s=@3;[m,d,s]=gwnoise(m,d,s);[x,y]=chanicon;')
set_param([sys,'/','Kanal'],...
		'Mask Help','This block adds white Gaussian noise to the input signal. The mean and the variance can be a scalar or vector with the same length as the input signal.',...
		'Mask Entries','0\/.001\/12345\/')


%     Finished composite block 'Kanal'.

set_param([sys,'/','Kanal'],...
		'position',[495,108,575,152])

add_block('built-in/Scope',[sys,'/','d_e(t)'])
set_param([sys,'/','d_e(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,824,1280,924])
open_system([sys,'/','d_e(t)'])
set_param([sys,'/','d_e(t)'],...
		'position',[840,180,870,210])

add_block('built-in/Product',[sys,'/','Product1'])
set_param([sys,'/','Product1'],...
		'hide name',0,...
		'position',[650,113,680,137])

add_block('built-in/Scope',[sys,'/','Senkensignal v(t)'])
set_param([sys,'/','Senkensignal v(t)'],...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,922,1280,1022])
open_system([sys,'/','Senkensignal v(t)'])
set_param([sys,'/','Senkensignal v(t)'],...
		'position',[1000,110,1030,140])

add_block('built-in/Scope',[sys,'/','Sendesignal s(t)'])
set_param([sys,'/','Sendesignal s(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,533,1280,633])
open_system([sys,'/','Sendesignal s(t)'])
set_param([sys,'/','Sendesignal s(t)'],...
		'position',[425,190,455,220])

add_block('built-in/Scope',[sys,'/','x(t)'])
set_param([sys,'/','x(t)'],...
		'orientation',1,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[344,434,1279,534])
open_system([sys,'/','x(t)'])
set_param([sys,'/','x(t)'],...
		'position',[165,210,195,240])


%     Subsystem  'Error rate'.

new_system([sys,'/','Error rate'])
set_param([sys,'/','Error rate'],'Location',[255,368,509,510])

add_block('built-in/S-Function',[sys,'/','Error rate/S-function'])
set_param([sys,'/','Error rate/S-function'],...
		'function name','sbiterr',...
		'parameters','num_lin, K, TDelay, Sample',...
		'position',[130,52,195,78])

add_block('built-in/Mux',[sys,'/','Error rate/Mux'])
set_param([sys,'/','Error rate/Mux'],...
		'inputs','2',...
		'position',[65,46,100,79])

add_block('built-in/Inport',[sys,'/','Error rate/in_1'])
set_param([sys,'/','Error rate/in_1'],...
		'position',[15,45,35,65])

add_block('built-in/Inport',[sys,'/','Error rate/in_2'])
set_param([sys,'/','Error rate/in_2'],...
		'Port','2',...
		'position',[15,60,35,80])
add_line([sys,'/','Error rate'],[105,65;125,65])
add_line([sys,'/','Error rate'],[40,55;60,55])
add_line([sys,'/','Error rate'],[40,70;60,70])
set_param([sys,'/','Error rate'],...
		'Mask Display','Error\nmeter',...
		'Mask Type','Symbol/bit error counter')
set_param([sys,'/','Error rate'],...
		'Mask Dialogue','Use the input data from the 1st port as the reference signal to detect the number of errors and error rate of the 2nd signal.|Bit per symbol:|Number of digits on display:|Delay between 1st port and 2nd port:|Sample time (sec):')
set_param([sys,'/','Error rate'],...
		'Mask Translate','K=@1;num_lin=@2;TDelay=@3;Sample=@4;')
set_param([sys,'/','Error rate'],...
		'Mask Help','The signal from the first port must be a scalar. The second input port can be a vector with a delay to the first port signal. The comparison happens only at the sampling point.')
set_param([sys,'/','Error rate'],...
		'Mask Entries','1\/10\/1\/1\/')


%     Finished composite block 'Error rate'.

set_param([sys,'/','Error rate'],...
		'orientation',1,...
		'position',[900,235,980,275])

add_block('built-in/Scope',[sys,'/','u(t)'])
set_param([sys,'/','u(t)'],...
		'move name',0,...
		'Vgain','2.000000',...
		'Hgain','25.000000',...
		'Vmax','4.000000',...
		'Hmax','50.000000',...
		'Window',[345,339,1280,439])
open_system([sys,'/','u(t)'])
set_param([sys,'/','u(t)'],...
		'position',[100,210,130,240])


%     Subsystem  ['Schwellenwert-',13,'Entscheider'].

new_system([sys,'/',['Schwellenwert-',13,'Entscheider']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],'Location',[159,417,467,586])

add_block('built-in/Constant',[sys,'/',['Schwellenwert-',13,'Entscheider/Constant']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/Constant']],...
		'Value','0.5',...
		'position',[60,107,90,133])

add_block('built-in/Inport',[sys,'/',['Schwellenwert-',13,'Entscheider/in_1']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/in_1']],...
		'position',[65,20,85,40])

add_block('built-in/Relational Operator',[sys,'/',['Schwellenwert-',13,'Entscheider/Relational',13,'Operator']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/Relational',13,'Operator']],...
		'Operator','>',...
		'position',[150,57,180,88])

add_block('built-in/Outport',[sys,'/',['Schwellenwert-',13,'Entscheider/out_1']])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider/out_1']],...
		'position',[215,65,235,85])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[90,30;115,30;115,65;145,65])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[95,120;110,120;110,80;145,80])
add_line([sys,'/',['Schwellenwert-',13,'Entscheider']],[185,75;210,75])
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'Mask Display','plot(-50,-50,50,50,[-50,50],[0,0],[0,0],[-50,50],[-40,0],[-30,-30],[0,40],[30,30])',...
		'Mask Type','Sign',...
		'Mask Dialogue','y = sign(x)')
set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'Mask Help','Sign Function:\n\t\t\ty = 1 if x > 0\n\t\t\ty = 0 if x = 0\n\t\t\ty = -1 if x < 0')


%     Finished composite block ['Schwellenwert-',13,'Entscheider'].

set_param([sys,'/',['Schwellenwert-',13,'Entscheider']],...
		'position',[895,112,925,138])


%     Subsystem  ['Diagramme',13,'sendeseitig'].

new_system([sys,'/',['Diagramme',13,'sendeseitig']])
set_param([sys,'/',['Diagramme',13,'sendeseitig']],'Location',[475,310,844,551])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'sendeseitig/Constant1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Constant1']],...
		'Value','0',...
		'position',[130,130,150,150])

add_block('built-in/Step Fcn',[sys,'/',['Diagramme',13,'sendeseitig/Step input']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Step input']],...
		'Time','starttime',...
		'position',[35,85,55,105])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/in_1']],...
		'position',[35,40,55,60])

add_block('built-in/Switch',[sys,'/',['Diagramme',13,'sendeseitig/Switch']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Switch']],...
		'Threshold','1',...
		'position',[110,44,135,76])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'sendeseitig/Constant']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Constant']],...
		'Value','Inf',...
		'position',[35,130,55,150])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'sendeseitig/Mux1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Mux1']],...
		'inputs','2',...
		'position',[185,96,220,129])


%     Subsystem  ['Diagramme',13,'sendeseitig/Augendiagramm'].

new_system([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],'Location',[121,409,416,595])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/in_1']],...
		'position',[75,80,95,100])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/Plot1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'Mask Entries','[2 0 1+offset]\/[-1.5 1.5]\/0\/''w-/r-''\/0\/2/anzahl\/')


%     Finished composite block ['Diagramme',13,'sendeseitig/Augendiagramm'].

set_param([sys,'/',['Diagramme',13,'sendeseitig/Augendiagramm']],...
		'position',[275,37,330,73])


%     Subsystem  ['Diagramme',13,'sendeseitig/Trajektorie'].

new_system([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],'Location',[165,242,460,428])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_1']],...
		'position',[15,55,35,75])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_2']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/in_2']],...
		'Port','2',...
		'position',[20,115,40,135])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/Mux']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/Mux']],...
		'inputs','2',...
		'position',[65,70,100,105])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/Plot1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie/Plot1']],...
		'function name','eyediasi',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],[40,65;45,65;45,80;60,80])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],[45,125;50,125;60,95])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],[105,90;125,90])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'Mask Display','plot(0,0,100,100,x,y,v,w);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'Mask Dialogue','Produce eye-pattern diagram/scatter\nplot/x-y plot with the rising edge of the second input as the decision line.|Eye-pattern plot time frame:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Line-type for x-y plot (0 for no plot):')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);[v,w]=trigicon(0,25,get_param(gcb,''orientation''),2);')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'Mask Help','This plot opens one, two, or three plots by assigning the line type parameters. The scatter plot point is selected by the rising edge of a trigger signal. A decision line is drawn at the rising edge of the trigger signal.')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'Mask Entries','[2 0 1]\/[-1.5 1.5]\/0\/0\/0\/''g-''\/')


%     Finished composite block ['Diagramme',13,'sendeseitig/Trajektorie'].

set_param([sys,'/',['Diagramme',13,'sendeseitig/Trajektorie']],...
		'position',[275,105,330,140])


%     Subsystem  ['Diagramme',13,'sendeseitig/Signalraumpunkte'].

new_system([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],'Location',[165,242,460,428])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte/in_1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte/in_1']],...
		'position',[75,80,95,100])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte/Plot1']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])
add_line([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'Mask Entries','[1 .5 .999]\/[-1.5 1.5]\/0\/0\/''y.''\/[.5 offset]\/')


%     Finished composite block ['Diagramme',13,'sendeseitig/Signalraumpunkte'].

set_param([sys,'/',['Diagramme',13,'sendeseitig/Signalraumpunkte']],...
		'position',[275,173,330,207])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'sendeseitig/Mux']])
set_param([sys,'/',['Diagramme',13,'sendeseitig/Mux']],...
		'inputs','2',...
		'position',[185,36,220,69])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[140,60;180,60])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[150,60;150,105;180,105])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[155,140;165,140;165,45;180,45])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[165,120;180,120])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[225,115;270,115])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[250,115;250,190;270,190])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[60,140;95,140;105,70])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[60,95;75,95;75,60;105,60])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[60,50;105,50])
add_line([sys,'/',['Diagramme',13,'sendeseitig']],[225,55;270,55])
set_param([sys,'/',['Diagramme',13,'sendeseitig']],...
		'Mask Display','plot(0,0,100,100,x,y)',...
		'Mask Type','Diagramme')
set_param([sys,'/',['Diagramme',13,'sendeseitig']],...
		'Mask Dialogue','Augendiagramm, Trajektorie und\nSignalraumpunkte.|Startzeit f黵 Plot:|Abtastwerte pro Zeitfenster (2*TS):|Offset der Entscheiderlinie zur Mitte:')
set_param([sys,'/',['Diagramme',13,'sendeseitig']],...
		'Mask Translate','starttime = @1;  anzahl = @2; offset = @3; [x, y] = srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'sendeseitig']],...
		'Mask Help','Dieser Block stellt die Augendiagramme, Trajektorien,\nund Signalraumpunkte auf der Sende- oder Empfangsseite dar',...
		'Mask Entries','0\/40\/0\/')


%     Finished composite block ['Diagramme',13,'sendeseitig'].

set_param([sys,'/',['Diagramme',13,'sendeseitig']],...
		'position',[205,25,260,65])


%     Subsystem  ['Diagramme',13,'empfangsseitig'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],'Location',[475,310,844,551])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Mux']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Mux']],...
		'inputs','2',...
		'position',[185,36,220,69])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Signalraumpunkte'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],'Location',[165,242,460,428])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte/in_1']],...
		'position',[75,80,95,100])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'Mask Entries','[1 .5 .999]\/[-1.5 1.5]\/0\/0\/''y.''\/[.5 offset]\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Signalraumpunkte'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Signalraumpunkte']],...
		'position',[275,173,330,207])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Trajektorie'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],'Location',[165,242,460,428])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Plot1']],...
		'function name','eyediasi',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Mux']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/Mux']],...
		'inputs','2',...
		'position',[65,70,100,105])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_2']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_2']],...
		'Port','2',...
		'position',[20,115,40,135])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie/in_1']],...
		'position',[15,55,35,75])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[105,90;125,90])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[45,125;50,125;60,95])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],[40,65;45,65;45,80;60,80])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Display','plot(0,0,100,100,x,y,v,w);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Dialogue','Produce eye-pattern diagram/scatter\nplot/x-y plot with the rising edge of the second input as the decision line.|Eye-pattern plot time frame:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Line-type for x-y plot (0 for no plot):')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);[v,w]=trigicon(0,25,get_param(gcb,''orientation''),2);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Help','This plot opens one, two, or three plots by assigning the line type parameters. The scatter plot point is selected by the rising edge of a trigger signal. A decision line is drawn at the rising edge of the trigger signal.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'Mask Entries','[2 0 1]\/[-1.5 1.5]\/0\/0\/0\/''g-''\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Trajektorie'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Trajektorie']],...
		'position',[275,105,330,140])


%     Subsystem  ['Diagramme',13,'empfangsseitig/Augendiagramm'].

new_system([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],'Location',[121,409,416,595])

add_block('built-in/S-Function',[sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/Plot1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/Plot1']],...
		'function name','eyesampl',...
		'parameters','time_range, boundary, kept_length, eye_line, scatter_line, two_d_line',...
		'position',[130,70,200,110])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm/in_1']],...
		'position',[75,80,95,100])
add_line([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],[100,90;125,90])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Display','plot(0,0,100,100,x,y);',...
		'Mask Type','Eye-diagram/scatter plot')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Dialogue','Produce eye-pattern diagram and/or scatter plot.|[Symbol interval, plot offset, decision point offset]:|Lower and upper bound of in-coming signal (1x2 vector):|Number of saved traces:|Line-type for eye-pattern diagram (0 for no plot):|Line-type for scatter plot (0 for no plot):|Plot update sample time:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Translate','time_range=@1;boundary=@2;kept_length=@3;eye_line=@4;scatter_line=@5;two_d_line=@6;[x,y]=srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Help','This plot opens one, or two plots by assigning the line type parameters. The scatter plot point is selected by the decision point in the first parameter entry. A decision line is drawn in the eye-pattern diagram. The plot is updated at the plot update sample time point.')
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'Mask Entries','[2 0 1+offset]\/[-1.5 1.5]\/0\/''w-/r-''\/0\/2/anzahl\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig/Augendiagramm'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig/Augendiagramm']],...
		'position',[275,37,330,73])

add_block('built-in/Mux',[sys,'/',['Diagramme',13,'empfangsseitig/Mux1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Mux1']],...
		'inputs','2',...
		'position',[185,96,220,129])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'empfangsseitig/Constant']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Constant']],...
		'Value','Inf',...
		'position',[35,130,55,150])

add_block('built-in/Switch',[sys,'/',['Diagramme',13,'empfangsseitig/Switch']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Switch']],...
		'Threshold','1',...
		'position',[110,44,135,76])

add_block('built-in/Inport',[sys,'/',['Diagramme',13,'empfangsseitig/in_1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/in_1']],...
		'position',[35,40,55,60])

add_block('built-in/Step Fcn',[sys,'/',['Diagramme',13,'empfangsseitig/Step input']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Step input']],...
		'Time','starttime',...
		'position',[35,85,55,105])

add_block('built-in/Constant',[sys,'/',['Diagramme',13,'empfangsseitig/Constant1']])
set_param([sys,'/',['Diagramme',13,'empfangsseitig/Constant1']],...
		'Value','0',...
		'position',[130,130,150,150])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[225,55;270,55])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,50;105,50])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,95;75,95;75,60;105,60])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[60,140;95,140;105,70])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[225,115;270,115])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[250,115;250,190;270,190])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[155,140;165,140;165,45;180,45])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[165,120;180,120])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[140,60;180,60])
add_line([sys,'/',['Diagramme',13,'empfangsseitig']],[150,60;150,105;180,105])
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Display','plot(0,0,100,100,x,y)',...
		'Mask Type','Diagramme')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Dialogue','Augendiagramm, Trajektorie und\nSignalraumpunkte.|Startzeit f黵 Plot:|Abtastwerte pro Zeitfenster (2*TS):|Offset der Entscheiderlinie zur Mitte:')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Translate','starttime = @1;  anzahl = @2; offset = @3; [x, y] = srcsicon(10);')
set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'Mask Help','Dieser Block stellt die Augendiagramme, Trajektorien,\nund Signalraumpunkte auf der Sende- oder Empfangsseite dar',...
		'Mask Entries','0\/40\/0\/')


%     Finished composite block ['Diagramme',13,'empfangsseitig'].

set_param([sys,'/',['Diagramme',13,'empfangsseitig']],...
		'position',[885,20,940,60])

add_block('built-in/Fcn',[sys,'/','Fcn'])
set_param([sys,'/','Fcn'],...
		'hide name',0,...
		'Expr','2*cos(4*pi*u)',...
		'position',[535,12,630,38])

add_block('built-in/Clock',[sys,'/','Clock1'])
set_param([sys,'/','Clock1'],...
		'hide name',0,...
		'position',[495,15,515,35])


%     Subsystem  'Doppelklick2'.

new_system([sys,'/','Doppelklick2'])
set_param([sys,'/','Doppelklick2'],'Location',[136,230,381,439])
set_param([sys,'/','Doppelklick2'],...
		'Mask Display','Rauschen einstellen',...
		'Mask Type','rauschen',...
		'Mask Dialogue','eval(''setnoise'')')


%     Finished composite block 'Doppelklick2'.

set_param([sys,'/','Doppelklick2'],...
		'BackGround',7,...
		'hide name',0,...
		'Font Angle','italic',...
		'position',[470,75,605,101])
add_line(sys,[240,155;255,155])
add_line(sys,[635,25;645,120])
add_line(sys,[520,25;530,25])
add_line(sys,[685,125;685,170])
add_line(sys,[805,125;890,125])
add_line(sys,[930,125;995,125])
add_line(sys,[360,155;370,155;370,135;390,135])
add_line(sys,[430,130;490,130])
add_line(sys,[580,130;645,130])
add_line(sys,[70,125;390,125])
add_line(sys,[70,125;180,125;180,205])
add_line(sys,[685,125;715,125])
add_line(sys,[960,125;960,230])
add_line(sys,[70,125;80,125;80,255;885,255;885,220;920,230])
add_line(sys,[80,225;95,225])
add_line(sys,[180,125;180,45;200,45])
add_line(sys,[440,130;440,185])
add_line(sys,[600,130;600,205])
add_line(sys,[805,125;855,125;855,175])
add_line(sys,[855,125;855,40;880,40])

drawnow

% Return any arguments.
if (nargin | nargout)
	% Must use feval here to access system in memory
	if (nargin > 3)
		if (flag == 0)
			eval(['[ret,x0,str,ts,xts]=',sys,'(t,x,u,flag);'])
		else
			eval(['ret =', sys,'(t,x,u,flag);'])
		end
	else
		[ret,x0,str,ts,xts] = feval(sys);
	end
else
	drawnow % Flash up the model and execute load callback
end